package com.jiepos.mpos.biz.http.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jiepos.mpos.biz.http.service.HttpTransService;
import com.jiepos.mpos.common.entity.GpsEntity;

/**
 * 
 * 交易流水相关
 * @ProjectName:  [mpos] 
 * @Package com.jiepos.mpos.biz.http.controller 
 * @author 娄伟峰
 * @version 1.0
 * @since 2017年10月19日 上午9:46:13
 * @history（历次修订内容、修订人、修订时间等）
 * @UpdateRemark [说明本次修改内容]
 * @Copyright (c) 2017 江苏杰博实信息技术有限公司
 */
@Controller
@RequestMapping("httptrans")
public class HttpTransController {
    @Autowired
    private HttpTransService httpTransService;


    /**
     * 查询交易流水
     */
    @RequestMapping("/getLogTrans.do")
    public @ResponseBody
    Map getLogTrans(HttpServletRequest request, HttpServletResponse response,
                      String login_id, String random_number, String custom_no, String begin_tm,
                      String end_tm,String curr_page,String rows_perpage,String sign, GpsEntity gpsEntity){
        return httpTransService.getLogTrans(request,login_id,random_number,custom_no,begin_tm,end_tm,curr_page,rows_perpage,sign,gpsEntity);
    }

    /**
     * 查询提现流水
     */
    @RequestMapping("/getAbstractTrans.do")
    public @ResponseBody
    Map getAbstractTrans(HttpServletRequest request, HttpServletResponse response,
                    String login_id, String random_number, String custom_no,String begin_tm,String end_tm,String curr_page,String rows_perpage,String sign, GpsEntity gpsEntity){
        return httpTransService.getAbstractTrans(request,login_id,random_number,custom_no,begin_tm,end_tm,curr_page,rows_perpage,sign,gpsEntity);
    }

    /**
     * 查询佣金流水
     * @return
     */
    @RequestMapping("/getCommissionTrans.do")
    public @ResponseBody
    Map getCommissionTrans(HttpServletRequest request, HttpServletResponse response,String login_id,
                           String random_number, String custom_no, String begin_tm,String end_tm,
                           String curr_page,String rows_perpage,String sign, GpsEntity gpsEntity){
        return httpTransService.getCommissionTrans(request,response,login_id,random_number,custom_no,begin_tm,end_tm,curr_page,rows_perpage,sign,gpsEntity);
    }

    /**
     * 查询分润流水
     * @return
     */
    @RequestMapping("/getProfitTrans.do")
    public @ResponseBody
    Map getProfitTrans(HttpServletRequest request, HttpServletResponse response,String login_id,
                           String random_number, String custom_no, String begin_tm,String end_tm,
                           String curr_page,String rows_perpage,String sign, GpsEntity gpsEntity){
        return httpTransService.getProfitTrans(request,response,login_id,random_number,custom_no,begin_tm,end_tm,curr_page,rows_perpage,sign,gpsEntity);
    }

    /**
     * 查询账户变动明细
     * @return
     */
    @RequestMapping("/getActChangeTrans.do")
    public @ResponseBody
    Map getActChangeTrans(HttpServletRequest request, HttpServletResponse response,String login_id,
                       String random_number, String custom_no, String begin_tm,String end_tm,
                       String curr_page,String rows_perpage,String sign, GpsEntity gpsEntity){
        return httpTransService.getActChangeTrans(request,response,login_id,random_number,custom_no,begin_tm,end_tm,curr_page,rows_perpage,sign,gpsEntity);
    }

}
